//
//  UIView+Frame.m
//  weibo
//
//  Created by hp on 16/4/25.
//  Copyright © 2016年 hp. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (void)set_x:(CGFloat)_x
{
    CGRect frame = self.frame;
    frame.origin.x = _x;
    self.frame = frame;
}

- (void)set_y:(CGFloat)_y
{
    CGRect frame = self.frame;
    frame.origin.y = _y;
    self.frame = frame;
}

- (void)set_width:(CGFloat)_width
{
    CGRect frame = self.frame;
    frame.size.width = _width;
    self.frame = frame;
}

- (void)set_height:(CGFloat)_height
{
    CGRect frame = self.frame;
    frame.size.height = _height;
    self.frame = frame;
}

- (CGFloat)_x
{
    CGRect frame = self.frame;
    return frame.origin.x;
}

- (CGFloat)_y
{
    CGRect frame = self.frame;
    return frame.origin.y;
}
- (CGFloat)_width
{
    CGRect frame = self.frame;
    return frame.size.width;
}
- (CGFloat)_height
{
    CGRect frame = self.frame;
    return frame.size.height;
}
@end
